Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Implement the "General" tab of new user settings #2491

Merged
merged 15 commits into from
Jan 24, 2019

Conversation

turt2live
Copy link
Member

Fixes element-hq/element-web#8200
Part of element-hq/element-web#7605

This PR does a number of things to support the new tab:

  • Copy components where possible to the tab, setting up stuff as required
  • Changes to Field to support reading the value without controlling the input
  • Implementation of a ToggleSwitch
  • Change SettingsFlag over to using ToggleSwitch
    • This has side effects - see comments
  • The 3pid management sections are all-new as the existing flows cannot be easily put in place here. See comments for more details. A gif is included below to show how emails work (applies to phone numbers too, with minor differences).
  • The existing UserSettings have been visibly broken but still work. Minor cosmetic fixes were done to keep it moderately usable, however it is expected that it doesn't look like what it used to.
  • Some of the dropdowns don't match - this is needing some amount of design review to figure out what is expected.

email-addresses
image
image

Makes the flair options in old settings look broken (cosmetic issues), but it's fine because we're ripping that out in due time.
This also changes the layout slightly in the user settings, but nothing detrimental.
The tab component is getting a bit hard to navigate
Also bring in the compact timeline option.

Without minor CSS changes, the old user settings are completely unusable with this change. As such, minimal effort has been put in to have it be useful. Similarly, the changes drop the use of radio groups and the old theme selector was the only one that used it. See the comments for more details on how/why this was mitigated the way it was.
@turt2live
Copy link
Member Author

Looks like the build is angry about branches again.

@turt2live turt2live requested a review from a team January 23, 2019 23:25
@jryans jryans self-assigned this Jan 24, 2019
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I think it looks great. 😁

I'd like to understand when we choose to import vs. sdk.getComponent first before approving, though.

res/css/views/elements/_AccessibleButton.scss Outdated Show resolved Hide resolved
res/css/views/settings/_PhoneNumbers.scss Show resolved Hide resolved
res/themes/dharma/css/_dharma.scss Outdated Show resolved Hide resolved
@@ -18,6 +18,7 @@ import React from "react";
import PropTypes from 'prop-types';
import SettingsStore from "../../../settings/SettingsStore";
import { _t } from '../../../languageHandler';
import ToggleSwitch from "./ToggleSwitch";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we choose when to import vs. call sdk.getComponent? It seems arbitrary...

Copy link
Member Author

@turt2live turt2live Jan 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea. The guideline I use is sdk.getComponent when copying old code in and import whenever I can. Usually the stuff brought in by sdk,getComponent is old and not easily import-able too.

Edit: have added it to our retro topics

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I also asked in #riot-dev as well.

@jryans jryans assigned turt2live and unassigned jryans Jan 24, 2019
@turt2live turt2live assigned jryans and unassigned turt2live Jan 24, 2019
@turt2live turt2live requested a review from jryans January 24, 2019 01:56
@turt2live
Copy link
Member Author

@jryans please take another look. I've also pushed a temporary branch to riot-web for the satisfaction of green checkmarks.

Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your replies and updates. Looks good to proceed. 😁

@jryans jryans assigned turt2live and unassigned jryans Jan 24, 2019
@turt2live turt2live merged commit 2a9f618 into experimental Jan 24, 2019
@turt2live turt2live deleted the travis/usettings/tab/general branch January 24, 2019 15:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants